﻿Public Class ClassRechercheIndirecteResult
    Public sRecherchee As String
    Public sRapport As String
    Private iFicTrouve As Long

    Public Sub New(ByVal sRecherchee As String, ByVal sRapport As String)
        Me.sRecherchee = sRecherchee.ToUpper
        Me.sRapport = sRapport
        Me.iFicTrouve = 0
    End Sub

    Public Sub Check(ByVal Chaine As String)
        If Chaine.Contains(sRecherchee) Then Me.iFicTrouve += 1
    End Sub

    Public ReadOnly Property iFicTrouves As Long
        Get
            Return iFicTrouve
        End Get
    End Property

    Public Function GetRapport() As String
        Return Me.sRapport.Replace("$NB", iFicTrouve.ToString)
    End Function
End Class
